package com.hyopt.modules.app.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hyopt.modules.app.entity.AlarmInfoEntity;
import com.hyopt.modules.app.form.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author liubin
 * @date 2020/1/6 10:56
 */
@Mapper
public interface AlarmInfoDao extends BaseMapper<AlarmInfoEntity> {
  List<AlarmListInfoVo> getNowList(@Param("form") AlarmNowQueryForm form);

  List<AlarmListInfoVo> getHandleList(@Param("form") AlarmHandledQueryForm form);

  List<AlarmListInfoVo> getUnHandleList(@Param("form") AlarmHandledQueryForm form);

  List<AlarmListInfoVo> getAllNumber(@Param("form") AlarmHandledQueryForm form);

  List<AlarmListInfoVo> totalList(@Param("form") AlarmListQueryForm form);

  /**
   * 批量更新状态
   * @param map
   * @return
   */
  boolean updateBatch(Map<String, Object> map);

  AlarmListInfoVo getDetail(@Param("Id") Integer Id);

  List getUserTokenByAlarmId(String[] ids);


}
